home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / pgrob.doc < prev    next >
Text File  |  1995-03-31  |  3KB  |  78 lines

  1. PGROB/UPGROB v 3.4, with LOOK, a sample application. 
  2.  
  3. Author: Erik Bryntse 
  4.   Date: Thu Nov 21 1991 
  5.  
  6.     =========================================== 
  7.      GROB COMPRESSION / UNCOMPRESSION PROGRAMS 
  8.     =========================================== 
  9.  
  10. Since the old version of my PGROB/UPGROB programs were unreliable, I fixed them 
  11. a few months ago. But when I was about to release them, the Redundance Fighter 
  12. by Lutz Wieweg appeared, and since it was better in many ways, I never released 
  13. my updated programs.  [Note: RF is on Goodies Disk #5.  PGROB/UPGROB was not 
  14. put on that disk because of their bugs, now fixed.  Thanx, Eric!  -jkh-] 
  15.  
  16. But since then I have gotten many questions about PGROB/UPGROB, so I will 
  17. release the updated versions anyway. I hope some of you may find it useful. 
  18.  
  19. After some work on PGROB and UPGROB they have now been almost completely 
  20. rewritten. They no longer corrupt RAM, and have a nicer user interface. 
  21.  
  22. GROB and PGROB are two small programs that compresses and uncompresses GROBs.  
  23. The compression method is simple Run-Length Encoding, which means that a  
  24. number of equal nibbles will be compressed into three nibbles saying "here  
  25. comes 57 nibbles of zeroes" for example. 
  26.  
  27. The efficiency of the programs depend largely on the type of GROB that you 
  28. are using. A picture with large areas of a single pattern and horizontal 
  29. lines will perhaps be compressed to 1/10 of its original size, but a very 
  30. complex picture may not be compressed at all (or even increase in size). 
  31.  
  32. Since UPGROB is very small (177 bytes) and fast, it can easily be imple- 
  33. mented in games and other programs, where you wish to have nice screens 
  34. without using too much memory. It will probably save memory even if you 
  35. only have one screen GROB. 
  36.  
  37. The programs behave well with all necessary error checking. A checksum on 
  38. the dimensions of the compressed GROB is included in the string that PGROB  
  39. returns. When uncompressing, the data must fill exactly that space, other- 
  40. wise a "Error: Bad Argument Value" occurs. This means that it is unlikely  
  41. that UPGROB should accept a string that is not a compressed GROB. 
  42.  
  43.  
  44. PGROB 
  45. ----- 
  46. 1: GROB  -->  1: String 
  47.  
  48. Usage:  Compresses GROB 
  49. Errors: "Bad Argument Value" if X or Y size larger than 4095 pixels 
  50.  
  51.  
  52. UPGROB 
  53. ------ 
  54. 1: String  -->  1: GROB 
  55.  
  56. Usage:  Uncompresses GROB 
  57. Errors: "Bad Argument Value" if checksum wrong or length wrong 
  58.  
  59. In the LOOK directory: 
  60.  
  61. LOOK 
  62. ---- 
  63. 1: String 
  64.  
  65. Usage: Uncompress and show. Use arrow keys to move around. 
  66.  
  67.  
  68. LUCY 
  69. ---- 
  70. A compressed GROB, use LOOK and look for yourself! 
  71. LUCY is compressed to 49% of its size, saving 1925 bytes. 
  72. [Press LUCY, then LOOK, then arrow keys to scroll...  -jkh-] 
  73.  
  74. Happy graphing! 
  75.  
  76. Erik Bryntse 
  77. erikmb@etek.chalmers.se 
  78.